The present invention relates to methods and apparatus for operating a digital signal processor or debugging a computer system.
During development and testing of an embedded computer system, especially an embedded microprocessor-based computer system, it is normally necessary to connect the system to a host computer so that an engineer can debug the embedded system. Debugging software on the host computer provides access by the engineer into the embedded system. Typically, the engineer uses the host computer and debugging software to set break points which stop threads of execution on the target embedded system, monitor registers in the target, monitor memory states and monitor input and output data. The engineer may also restart threads which have been previously stopped and perform a variety of other tasks including rebooting the target computer using the host.
As used herein, the term xe2x80x98digital signal processorxe2x80x99 includes microprocessors in general and other like digitally operating processing devices.
It has been found desirable for a host to dynamically load a library of functions and subroutines to an embedded system, such that the digital signal processor of the embedded system is able to access the library when required. Examples of such a need are where the library contains work-round routines enable hardware bugs to be masked or otherwise avoided, and where the library must be accessed to enable communication for debugging or set-up purposes to be carried out.
One problem is that the dynamically loaded location must be readily available to an application being run on the embedded system.
It is accordingly an object of embodiments of the present invention to at provide a solution to this problem.
According to a first aspect of the present invention there is provided a method of operating a digital signal processor connected to a host system, the digital signal processor having a memory including a reserved storage location designated as a vector, the method comprising:
dynamically loading into said memory a stack;
storing in said reserved location information indicative of said stack location;
dynamically loading a computer file into said memory for use by said digital signal processor; and
storing at a predetermined location in said stack data indicative of an entry point into said dynamically loaded file.
According to a second aspect of the present invention there is provided a method of debugging a computer system connected to a host computer, the computer system having a memory including a reserved storage location designated as a vector, the method comprising dynamically loading into said memory a stack;
storing in said reserved location information indicative of said stack location;
dynamically loading a computer file into said memory for use by said digital signal processor; and
storing at a predetermined location in said stack data indicative of an entry point into said dynamically loaded file;
causing an application to run on said computer system whereby said application accesses said vector to thereby locate said entry point whereby said application calls a subroutine in said computer file.